import Store from "lammu-store";
import Layout from './layout.ts';
import config from './config.ts';


class MyStore extends Store<typeof config> {
  constructor(reactive, data) {
    super(reactive, data);
    this.layout = new Layout(reactive, data.config);
  }

  readonly layout: Layout<typeof config>
}

const Global = new MyStore(() => {}, config, );

export default Global;

/** 在main.ts的时候调用一下, 初始化数据 */
export function initGlobalStore() {
  return Global;
}

